<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--Rendered using the Haskell Html Library v0.2-->
<HTML
><HEAD
><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
><TITLE
>Poker</TITLE
><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
><SCRIPT SRC="haddock.js" TYPE="text/javascript"
></SCRIPT
></HEAD
><BODY
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="topbar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
></TD
><TD CLASS="title"
></TD
><TD CLASS="topbut"
><A HREF="index.html"
>Contents</A
></TD
><TD CLASS="topbut"
><A HREF="doc-index.html"
>Index</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="modulebar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><FONT SIZE="6"
>Poker</FONT
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Description</TD
></TR
><TR
><TD CLASS="doc"
>Encapsulates poker rules and reactions to player actions.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Synopsis</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
> <A HREF="#t%3AHandRank"
>HandRank</A
> </TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3ArankHand"
>rankHand</A
> :: [<A HREF="Card.html#t%3AT"
>T</A
>] -&gt; <A HREF="Poker.html#t%3AHandRank"
>HandRank</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
> <A HREF="#t%3AGamePhase"
>GamePhase</A
> </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
>= <A HREF="#v%3AAnte"
>Ante</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ABet1"
>Bet1</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ADraw"
>Draw</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3APostDraw"
>PostDraw</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ABet2"
>Bet2</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AFinal"
>Final</A
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
> <A HREF="#t%3AAction"
>Action</A
> </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
>= <A HREF="#v%3ABet"
>Bet</A
> Int</TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ARaise"
>Raise</A
> Int</TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ASee"
>See</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ACall"
>Call</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AFold"
>Fold</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ACheck"
>Check</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3ADiscard"
>Discard</A
> [<A HREF="Card.html#t%3AT"
>T</A
>]</TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AHelp"
>Help</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AExit"
>Exit</A
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
> <A HREF="#t%3AGameState"
>GameState</A
> </TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aplayers"
>players</A
> :: <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; [<A HREF="Player.html#t%3AT"
>T</A
>]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aphase"
>phase</A
> :: <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; <A HREF="Poker.html#t%3AGamePhase"
>GamePhase</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AgetCurrentPlayer"
>getCurrentPlayer</A
> :: <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; <A HREF="Player.html#t%3AT"
>T</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3ArecentHistory"
>recentHistory</A
> :: <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; String</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AcompletePot"
>completePot</A
> :: <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; Int</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Adeal"
>deal</A
> :: <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; <A HREF="Poker.html#t%3AGameState"
>GameState</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Aante"
>ante</A
> :: <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; <A HREF="Poker.html#t%3AGameState"
>GameState</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3ApossibleActions"
>possibleActions</A
> :: <A HREF="Poker.html#t%3AGamePhase"
>GamePhase</A
> -&gt; [String]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AactivePlayers"
>activePlayers</A
> :: <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; Int</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AleavingDraw"
>leavingDraw</A
> :: <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; <A HREF="Poker.html#t%3AGameState"
>GameState</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AnewGame"
>newGame</A
> :: [<A HREF="Player.html#t%3AT"
>T</A
>] -&gt; IO <A HREF="Poker.html#t%3AGameState"
>GameState</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3ApickWinner"
>pickWinner</A
> :: <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; <A HREF="Poker.html#t%3AGameState"
>GameState</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Areset"
>reset</A
> :: <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; <A HREF="Poker.html#t%3AGameState"
>GameState</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AvalidateAction"
>validateAction</A
> :: <A HREF="Poker.html#t%3AAction"
>Action</A
> -&gt; <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; Maybe String</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AperformAction"
>performAction</A
> :: <A HREF="Poker.html#t%3AAction"
>Action</A
> -&gt; <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; <A HREF="Poker.html#t%3AGameState"
>GameState</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Documentation</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
> <A NAME="t%3AHandRank"
></A
><B
>HandRank</B
> </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="ndoc"
>The HandRank data represents all of the possible hands of Poker
  We constructured each hand by grouping matched rank cards (pair, 
  triple, quad) into one Card.Rank value and then all of the 
  remaining cards into a list. When a HandRank is constructed 
  properly it is possible to do a correct comparison between hands
  using the derived Ord and Eq definitions because Card.Rank is an
  Int and therefore has Ord and Eq instance definitions
</TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:HandRank')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:HandRank" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
>Eq <A HREF="Poker.html#t%3AHandRank"
>HandRank</A
></TD
></TR
><TR
><TD CLASS="decl"
>Ord <A HREF="Poker.html#t%3AHandRank"
>HandRank</A
></TD
></TR
><TR
><TD CLASS="decl"
>Show <A HREF="Poker.html#t%3AHandRank"
>HandRank</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3ArankHand"
></A
><B
>rankHand</B
> :: [<A HREF="Card.html#t%3AT"
>T</A
>] -&gt; <A HREF="Poker.html#t%3AHandRank"
>HandRank</A
></TD
></TR
><TR
><TD CLASS="doc"
>This function will takes a list of Cards and constructs the appropriate
  HandRanks such that they can be accurately compared and tie-broken.
  This means that each element of the hand is put in by its poker rank
  (triples before pairs, pairs before single cards, and everything in
  high-to-low rank order)
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
> <A NAME="t%3AGamePhase"
></A
><B
>GamePhase</B
> </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="ndoc"
>GamePhase represents the current phase of a round of Poker. Each
  Bet1 and Bet2 are phases that are entered in case actual betting
  occurs. They represent the process from a bet to a call (includes
  possible raising)
</TD
></TR
><TR
><TD CLASS="section4"
>Constructors</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v%3AAnte"
></A
><B
>Ante</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v%3ABet1"
></A
><B
>Bet1</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v%3ADraw"
></A
><B
>Draw</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v%3APostDraw"
></A
><B
>PostDraw</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v%3ABet2"
></A
><B
>Bet2</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v%3AFinal"
></A
><B
>Final</B
></TD
><TD CLASS="rdoc"
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:GamePhase')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:GamePhase" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
>Enum <A HREF="Poker.html#t%3AGamePhase"
>GamePhase</A
></TD
></TR
><TR
><TD CLASS="decl"
>Eq <A HREF="Poker.html#t%3AGamePhase"
>GamePhase</A
></TD
></TR
><TR
><TD CLASS="decl"
>Show <A HREF="Poker.html#t%3AGamePhase"
>GamePhase</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
> <A NAME="t%3AAction"
></A
><B
>Action</B
> </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="ndoc"
>Action represent the individual operations that a Player can do
  Determining which actions are valid is dependent on the current
  GamePhase.
</TD
></TR
><TR
><TD CLASS="section4"
>Constructors</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v%3ABet"
></A
><B
>Bet</B
> Int</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v%3ARaise"
></A
><B
>Raise</B
> Int</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v%3ASee"
></A
><B
>See</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v%3ACall"
></A
><B
>Call</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v%3AFold"
></A
><B
>Fold</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v%3ACheck"
></A
><B
>Check</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v%3ADiscard"
></A
><B
>Discard</B
> [<A HREF="Card.html#t%3AT"
>T</A
>]</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v%3AHelp"
></A
><B
>Help</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v%3AExit"
></A
><B
>Exit</B
></TD
><TD CLASS="rdoc"
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Action')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:Action" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
>Show <A HREF="Poker.html#t%3AAction"
>Action</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
> <A NAME="t%3AGameState"
></A
><B
>GameState</B
> </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="ndoc"
>A GameState represents all the information necessary to describe
  a current round of Poker at a given time.
</TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:GameState')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:GameState" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
>Show <A HREF="Poker.html#t%3AGameState"
>GameState</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Aplayers"
></A
><B
>players</B
> :: <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; [<A HREF="Player.html#t%3AT"
>T</A
>]</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Aphase"
></A
><B
>phase</B
> :: <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; <A HREF="Poker.html#t%3AGamePhase"
>GamePhase</A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3AgetCurrentPlayer"
></A
><B
>getCurrentPlayer</B
> :: <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; <A HREF="Player.html#t%3AT"
>T</A
></TD
></TR
><TR
><TD CLASS="doc"
>Get the player data for the current player.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3ArecentHistory"
></A
><B
>recentHistory</B
> :: <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; String</TD
></TR
><TR
><TD CLASS="doc"
>Get a <A HREF="paragraph.html"
>paragraph</A
> describing the actions that have most recently occured.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3AcompletePot"
></A
><B
>completePot</B
> :: <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; Int</TD
></TR
><TR
><TD CLASS="doc"
>Calculate the complete total in the pot by summing each player's pot.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Adeal"
></A
><B
>deal</B
> :: <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; <A HREF="Poker.html#t%3AGameState"
>GameState</A
></TD
></TR
><TR
><TD CLASS="doc"
>Deal 5 cards to each player in the game. The resulting deck
  is returned from each deal so its state holds.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Aante"
></A
><B
>ante</B
> :: <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; <A HREF="Poker.html#t%3AGameState"
>GameState</A
></TD
></TR
><TR
><TD CLASS="doc"
>Ante up! Tests if players have less than the ante amount
  and disables them if so.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3ApossibleActions"
></A
><B
>possibleActions</B
> :: <A HREF="Poker.html#t%3AGamePhase"
>GamePhase</A
> -&gt; [String]</TD
></TR
><TR
><TD CLASS="doc"
>Links a game phase to the valid actions in that phase.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3AactivePlayers"
></A
><B
>activePlayers</B
> :: <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; Int</TD
></TR
><TR
><TD CLASS="doc"
>Current number of active players.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3AleavingDraw"
></A
><B
>leavingDraw</B
> :: <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; <A HREF="Poker.html#t%3AGameState"
>GameState</A
></TD
></TR
><TR
><TD CLASS="doc"
>Changes the state to after the drawing round, play resumes with the next
  active player after the dealer.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3AnewGame"
></A
><B
>newGame</B
> :: [<A HREF="Player.html#t%3AT"
>T</A
>] -&gt; IO <A HREF="Poker.html#t%3AGameState"
>GameState</A
></TD
></TR
><TR
><TD CLASS="doc"
>Construct a new game state from a list of players.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3ApickWinner"
></A
><B
>pickWinner</B
> :: <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; <A HREF="Poker.html#t%3AGameState"
>GameState</A
></TD
></TR
><TR
><TD CLASS="doc"
>Picks the winning hand(s) and distributes the reward(s).
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3Areset"
></A
><B
>reset</B
> :: <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; <A HREF="Poker.html#t%3AGameState"
>GameState</A
></TD
></TR
><TR
><TD CLASS="doc"
>Reset all players.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3AvalidateAction"
></A
><B
>validateAction</B
> :: <A HREF="Poker.html#t%3AAction"
>Action</A
> -&gt; <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; Maybe String</TD
></TR
><TR
><TD CLASS="doc"
>Determines if a particular Action is valid given the GameState.
  Returns Nothing if the action is valid, otherwise a string with the
  appropriate error.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v%3AperformAction"
></A
><B
>performAction</B
> :: <A HREF="Poker.html#t%3AAction"
>Action</A
> -&gt; <A HREF="Poker.html#t%3AGameState"
>GameState</A
> -&gt; <A HREF="Poker.html#t%3AGameState"
>GameState</A
></TD
></TR
><TR
><TD CLASS="doc"
>Perform the current player's action, affecting a change in the current
  game state. This function actually performs the action and then tests
  the resulting state for certain special cases like all players but 1
  folding or folds that proceed to the next round.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
> version 0.8</TD
></TR
></TABLE
></BODY
></HTML
>
